<template>
  <div>
    用户名： <input type="text" name="username" v-model="form.username" /><br />
    密码： <input type="text" name="password" v-model="form.password" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        username: '',
        password: '',
      },
    }
  },
  methods: {
    add() {
      console.log(this.form.username, this.form.password)
      this.form = {
        username: '',
        password: '',
      }
    },
  },
}
</script>

<style scoped></style>
